package com.wans.guli.auth.vo;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 会员VO
 * 
 * @author wans
 * @email wansconst@163.com
 * @date 2025-08-01 16:25:57
 */
@Data
@TableName("ums_member")
public class MemberRegisterVO implements Serializable {
	private static final long serialVersionUID = 1L;
	/**
	 * 用户名
	 */
	@NotNull(message = "用户名不能为空")
	@Length(min = 6, max = 18, message = "用户名长度在6-18之间")
	private String username;
	/**
	 * 密码
	 */
	@NotNull(message = "密码不能为空")
	@Length(min = 6, max = 18, message = "密码长度在6-18之间")
	private String password;
	/**
	 * 手机号码
	 */
	@NotNull(message = "手机号不能为空")
	@Length(min = 11, max = 11, message = "手机号长度为11位")
	@Pattern(regexp = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|(19[8,9]))\\d{8}$", message = "手机号格式不正确")
	private String mobile;
	/**
	 * 验证码
	 */
	@NotNull(message = "验证码不能为空")
	@Length(min = 6, max = 6, message = "验证码长度为6位")
	private String code;
}
